﻿
namespace API.Profiles
{
    public abstract class EndUserProfileService : IEndUserProfile
    {
        private readonly IEndUserProfile _endUserProfile;
        //private readonly IUserAccessService _userAccessService;

        //protected EndUserProfileService(IEndUserProfile authenticatedUserProfile, IUserAccessService userAccessService)
        //{
        //    _userAccessService = userAccessService;
        //    _endUserProfile = authenticatedUserProfile;
        //}

        protected EndUserProfileService(IEndUserProfile authenticatedUserProfile)
        {
            
            _endUserProfile = authenticatedUserProfile;
        }

        public string Username
        {
            get
            {
                return _endUserProfile.Username;
            }
        }

        public int UserId
        {
            get
            {
                return _endUserProfile.UserId;
            }
        }

       

        //public bool CheckUserAccess(string userAccessGuid, bool throwException = true)
        //{
        //    return true;
        //    if (_userAccessService == null)
        //        throw new ApplicationException("UserAccessService cannot be null. Check your Constructor.");

        //    return _userAccessService.CheckUserAccessAllowed(userAccessGuid, throwException);
        //}
    }
}
